package com.zwj.batch.config.springBatch.listener.job;

import org.springframework.batch.core.JobExecution;
import org.springframework.batch.core.JobExecutionListener;

/**
 * 作业监听器-实现接口形式
 * @author 张文接
 * @version 1.0
 * @createTime 2023-05-24 21:12:00
 */
public class JobStateListener implements JobExecutionListener {
    @Override
    public void beforeJob(JobExecution jobExecution) {
        System.err.println("执行前：state：" + jobExecution.getStatus());
    }

    @Override
    public void afterJob(JobExecution jobExecution) {
        System.err.println("执行后：state：" + jobExecution.getStatus());
    }
}
